//
//  ThousandTableViewCell.m
//  10-CustomTableViewCell
//
//  Created by 李昊林 on 16/7/27.
//  Copyright © 2016年 李昊林. All rights reserved.
//

#import "ThousandTableViewCell.h"
#import "UIView+Frame.h"
#import "CustomTableViewCell.h"

#define kWidth self.contentView.frame.size.width
#define kHeght self.contentView.frame.size.height

@interface CustomTableViewCell ()
//不要和系统控件取到重名
@property (nonatomic,strong)UIImageView *newsImageView;
@property (nonatomic,strong)UILabel *titleLable;
@property (nonatomic,strong)UILabel *descriptionLable;
@property (nonatomic,strong)UILabel *numberCountsLable;

@end
@implementation ThousandTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // TableViewCell的默认大小 宽320 高44
        // 在初始化时, cell的frame是初始值, 不能为自定义视图布局
        NSLog(@"初始化时, cell的frame是%@", NSStringFromCGRect(self.frame));
        // 添加子View
        self.customView = [[UIView alloc] initWithFrame:CGRectZero];
        self.customView.backgroundColor = [UIColor orangeColor];
        [self.contentView addSubview:_customView];
        // 初始化方法中, 只负责创建
    }
    return self;
}




- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
